package com.vasthu.api.service;

import com.vasthu.api.domain.Bill;
import java.util.*;
import com.vasthu.gui.VstTableItemSelectable;
import java.sql.Connection;

public interface BillManagerService {
	
    public boolean insertBill(Connection con, Bill bill);
	/**
	 * returns all stock_items for selection table
	 * 'VstTableItem' class will only used by GUI
	 */
	public List<VstTableItemSelectable> getAllStockItemsForSelectionTable();
	
	/** 
	 * creates a new record in Bill table and returns its id 
	 */
	//public long createNewBill(long userId, Date date /* required data */); // NEW state
	
	/** 
	 * inserts 'itemId' item to 'billId' Bill
	 * updates stock_item table
	 */
	//public boolean addItemToBill(long billId, /* bill item data */); // OPEN state
	
	/** 
	 * deletes 'itemId' item from 'billId' Bill
	 * updates stock_item table
	 */
	//public boolean deleteItemFromBill(long billId, long itemId); // OPEN state
	
	/**
	 * can't add new items anymore. finalizes with calculations
	 * updates payments related table if required
	 */
	//public boolean calculateBill(long billId /* required data */); // COMPLETE state
	
	/** 
	 * closed with payments
	 */
	//public boolean closeBill(long billId /* required data */); // PAID state
	
	/**
	 * delete a empty(NEW state) bill
	 * we can delete bill if and only if it is in NEW state
	 * CASHIER can do this. No special permission required
	 */
	//public void deleteBill();
	
}